#!/bin/sh /etc/rc.common
# Copyright (C) 2006-2011 OpenWrt.org

START=95
STOP=10
BIN=/usr/sbin/cfgmgr

USE_PROCD=1

start_service() {
	if [ ! -e /usr/share/nginx-ac/sites-enabled/admin ]; then
		ln -sf /usr/share/admin-web/admin-ac /usr/share/nginx-ac/sites-enabled/admin
	fi
	procd_open_instance
	procd_set_param command $BIN start
	procd_set_param respawn
	procd_close_instance
}

stop_service() {
	$BIN stop
}
